<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>用户登录</title>
		<style type="text/css">
			#show{
				width: 400px;
				margin: 0px auto;
			}
			table{
				text-align: center;
			}
		</style>
		<script src="js/jquery-1.12.4.js"></script>
		<script type="text/javascript">
			$(function(){
				$("form[name=myForm]").submit(function(){
					var bool=Verify();
					return bool;
				});
			});
			
			function Verify () {
				var bool=true;
				if ($("input[name=name]").val() =="") {
					alert("用户名不能为空");
					bool= false;
				}
				if ($("input[name=pwd]").val() == "") {
					alert("密码不能为空");
					bool= false;
				}
				return bool;
			}
		</script>
	</head>
	<body>
		<div id="show">
			<h4>用户登录</h4>
			<form action="Register" method="post" name="myForm">	
				<table border="0" cellspacing="" cellpadding="">
					<tr>
						<td>用户名:</td>
						<td>
							<input type="text" id="name" value=""/>
						</td>
					</tr>
					<tr>
						<td>密码:</td>
						<td>
							<input type="password" name="pwd" value=""/>
						</td>
					</tr>
					<tr>
						<td colspan="2">
							<input type="submit" name="su" id="su" value="登录" />
							<a href="index.html">注册</a>
						</td>
					</tr>
					<tr>
						<td colspan="2" id="shows" style="text-align: center;color: red;">
							${message }
						</td>
					</tr>
				</table>
			</form>
		</div>
	</body>
</html>
